home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Utilities / Winter Shell 1.0d2 / Source / Libraries / FontLib / FontLib.c next >
Encoding:
C/C++ Source or Header  |  1993-12-25  |  503 b   |  29 lines  |  [TEXT/KAHL]

  1. /* Revision History:
  2.     
  3.     93/12/24 aih - added font id function
  4.     
  5.     91/01/05 Ari Halberstadt
  6.     - Inserted this standard header in all files */
  7.  
  8. #include "FontLib.h"
  9.  
  10. /* return height of current font */
  11. short FontHeight(void)
  12. {
  13.     FontInfo info;
  14.     
  15.     GetFontInfo(&info);
  16.     return(info.ascent + info.descent + info.leading);
  17. }
  18.  
  19. /* return the actual ID of the font */
  20. short FontID(short font)
  21. {
  22.     if (font == applFont) {
  23.         font = GetSysPPtr()->font + 1;
  24.         if (font == applFont)
  25.             font = geneva;
  26.     }
  27.     return(font);
  28. }
  29.